// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "Data/MenuInteractionInterface.h"
#include "Data/MissionStruct.h"
#include "SingleQuestWidget.generated.h"

DECLARE_MULTICAST_DELEGATE_OneParam(FClickedToQuest, USingleQuestWidget*);
DECLARE_MULTICAST_DELEGATE_OneParam(FHoveredToQuest, USingleQuestWidget*);
DECLARE_MULTICAST_DELEGATE(FUnHoveredQuest);
UCLASS()
class MISCELLANEOUSPROJECT_API USingleQuestWidget : public UUserWidget,public IMenuInteractionInterface
{
	GENERATED_BODY()
public:
	virtual void NativeOnInitialized() override;
	virtual void NativePreConstruct() override;
	virtual void SimulateClick() override;
public:
	void ConstructWidget(const FMissionMaster& MissionInfo);
public:
	void SetQuestActive();
	void SetQuestInActive();
	void SetSelected();
	void SetUnSelected();
	void OnHovered();
	void OnUnHovered();
	UFUNCTION()
	void ClickEvent();
	UFUNCTION()
	void HoveredEvent();
	UFUNCTION()
	void UnHoveredEvent();
public:
	UPROPERTY(meta = (BindWidget))
	class UBorder* BG;
	UPROPERTY(meta = (BindWidget))
	class UButton* DummyButton;
	UPROPERTY(meta = (BindWidget))
	class UBorder* Frame;
	UPROPERTY(meta = (BindWidget))
	class UTextBlock* MissionSubtitle;
	UPROPERTY(meta = (BindWidget))
	class UTextBlock* MissionTitle;
	UPROPERTY(meta = (BindWidget))
	class UTextBlock* RecommendedLevel;
	UPROPERTY(meta = (BindWidget))
	class USizeBox* Sizer;
	UPROPERTY(meta = (BindWidget))
	class UBorder* SuggestedBorder;


	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ExposeOnSpawn = "true"), Category = "Default")
	FMissionMaster MissionInfo;

	FClickedToQuest ClickedToQuest;
	FHoveredToQuest HoveredToQuest;
	FUnHoveredQuest UnHoveredQuest;
private:
	FLinearColor DefaultBGColor;
	FLinearColor HoveredBGColor;
	FLinearColor SDefaultBGColor;
	FLinearColor SHoveredBGColor;
	FLinearColor DefaultFrameColor;
	FLinearColor HoveredFrameColor;
	FLinearColor SDefaultFrameColor;
	FLinearColor SHoveredFrameColor;
	FLinearColor DefaultSuggestedColor;
	FLinearColor HoveredSuggestedColor;
	FLinearColor SDefaultSuggestedColor;
	FLinearColor SHoveredSuggestedColor;
	bool IsActiveQuest;
	bool IsSelected;
	
};
